Skip to content

fix(web): show sidebar startup loading state#899

Open
binbandit wants to merge 3 commits intopingdotgg:mainfrom
binbandit:t3code/sidebar-startup-loading-spinner
Open

fix(web): show sidebar startup loading state#899
binbandit wants to merge 3 commits intopingdotgg:mainfrom
binbandit:t3code/sidebar-startup-loading-spinner

Conversation

@binbandit
Copy link
Contributor

@binbandit binbandit commented Mar 11, 2026

Summary

  • show a startup loading state in the sidebar until the first projects/threads snapshot hydrates
  • keep the existing empty state only after hydration completes
  • add a browser test covering the loading-to-empty transition and register it in the browser Vitest config

Validation

  • bun run test:browser src/components/Sidebar.browser.tsx
  • bun fmt
  • bun lint
  • bun typecheck

UI

Screenshot 2026-03-11 at 8 54 02 pm

Note

Show startup loading state in sidebar until threads are hydrated

  • Adds a loading spinner with 'Loading projects and threads' and 'Restoring your workspace from the server.' messages to Sidebar.tsx, displayed until threadsHydrated is true in the store.
  • Suppresses the 'No projects yet' empty state until hydration completes, preventing a flash of empty content on startup.
  • Adds a browser test in Sidebar.browser.tsx that mounts the full app and asserts the loading and empty states at each hydration phase.
  • Broadens vitest.browser.config.ts to discover all **/*.browser.tsx test files via glob instead of a fixed list.

Macroscope summarized a6b88a5.

@coderabbitai
Copy link

coderabbitai bot commented Mar 11, 2026

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 6ccac51a-273c-4dd3-9b04-5bce49077423

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
📝 Coding Plan
  • Generate coding plan for human review comments

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions github-actions bot added the vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. label Mar 11, 2026
…tup-loading-spinner

# Conflicts:
#	apps/web/src/components/Sidebar.tsx
@github-actions github-actions bot added the size:XL 500-999 changed lines (additions + deletions). label Mar 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XL 500-999 changed lines (additions + deletions). vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants